package Padre::Plugin::Moose;

=head1 NAME

Padre::Plugin::Moose - Padre plugin for Moose

=head1 SYNOPSIS

After installation when you run Padre there should be an outline for Moose
keywords.

=for readme stop

=cut

use 5.008;

use strict;
use warnings;

our $VERSION = '0.01';

our @EXPORT_OK = qw{plugin_config};

use Padre::Wx ();
use base 'Padre::Plugin';


# static field to contain reference to current plugin configuration
my $config;

sub plugin_config {
    return $config;
}

sub padre_interfaces {
    return 'Padre::Plugin'         => 0.26,
}

# called when the plugin is enabled
sub plugin_enable {
    my $self = shift;

    # Read the plugin configuration, and create it if it is not there
    $config = $self->config_read;
    if(! $config) {
        # no configuration, let us write some defaults
        $config = {};
        $self->config_write($config);
    }

    return 1;
}

sub registered_documents {
    return 'application/x-perl'    => 'Padre::Document::Moose',
}


1;


=for readme continue

=head1 AUTHOR

Piotr Roszatycki <dexter@cpan.org>

=head1 LICENSE

This program is free software; you can redistribute it and/or
modify it under the same terms as Perl 5 itself.
